﻿using System.ComponentModel.DataAnnotations;
using YFurion.Application;

namespace UpperComputer.Application
{
    public class BaseRolePermissionDto : EntityDto
    {
        [Required, RegularExpression(@"^[a-zA-Z]{1,50}$")]
        public string RoleCode { get; set; }

        [Required, RegularExpression(@"^[A-Z][a-zA-Z]{1,99}$")]
        public string PermissionCode { get; set; }

        [Range(1, 2)]
        public int Type { get; set; }

        [Range(1, int.MaxValue)]
        public int Sort { get; set; }    
    }
}
